package com.hdax.dmw.base.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hdax.dmw.entity.base.DmImage;
import com.hdax.dmw.base.service.DmImageService;
import com.hdax.dmw.base.mappers.DmImageMapper;
import org.springframework.stereotype.Service;

/**
* @author guoyisha
* @description 针对表【dm_image(图片表)】的数据库操作Service实现
* @createDate 2023-06-15 12:02:55
*/
@Service
public class DmImageServiceImpl extends ServiceImpl<DmImageMapper, DmImage>
    implements DmImageService{

    //查询商品的海报图
    @Override
    public DmImage image(Long targetId, Long type, Long category) {
        QueryWrapper<DmImage> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("targetId",targetId);
        queryWrapper.eq("type",type);
        queryWrapper.eq("category",category);
        return getOne(queryWrapper);
    }
}




